package service;

import org.springframework.stereotype.Service;

import java.util.List;

import domain.ContractModel;

/**
 * User: xinxin
 * Date: 2016-10-26
 * Time: 15:18
 * FIXME
 */

public interface ContractModelServiceI {
    ContractModel selectModelById(int id);

    /**
     * 根据类型去查找有哪些合同范本
     * @param typeId 类型的id
     * @return
     */
    List<ContractModel> selectModelByTypeId(int typeId);

    List<ContractModel> selectModelByTypeId(int typeId,int pageIndex,int perPage);
    List<ContractModel> selectModelByName(String name,int pageIndex,int perPage);

    /**
     * 分页查询所有合同范本
     * @param pageIndex 页码
     * @param perPage 每页的数量
     * @return
     */
    List<ContractModel> selectModelAll(int pageIndex,int perPage);
    List<ContractModel> selectModelAll(int pageIndex);

    boolean newModel(ContractModel contractModel);

    boolean updateModel(ContractModel contractModel);

    boolean deleteModel(ContractModel contractModel);
    boolean deleteModel(int contractId);
}
